<div class="container-fluid" style="margin-top: 10px;">

    <div class="row">
        <form id="condition-form" class="mt10" method="post" action="addConditionSession" enctype="multipart/form-data">
            <div class="col-xs-12" >
                {:Form('text',['title'=>'资产编号','name'=>'BOOK_NO','value'=>$Think.session.list_condition_book.BOOK_NO,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'资产名称','name'=>'BOOK_NAME','value'=>$Think.session.list_condition_book.BOOK_NAME,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'预算项目编号','name'=>'BUDGET_NO','value'=>$Think.session.list_condition_book.BUDGET_NO,'col'=>'col-xs-12'])}
                {:Form('text',['title'=>'出版社','name'=>'PRESS_NAME','value'=>$Think.session.list_condition_book.PRESS_NAME,'col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'资产分类','name'=>'ASSET_TYPE_ID','value'=>$Think.session.list_condition_book.ASSET_TYPE_ID,'url'=>'dict/getBookAssetType','key'=>'CCODE94','field'=>'CNAME94','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'采购组织形式','name'=>'PURCHASE_ID','value'=>$Think.session.list_condition_book.PURCHASE_ID,'url'=>'dict/getPurchase','key'=>'PURCHASE_ID','field'=>'PURCHASE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'取得方式','name'=>'GETTYPE_ID','value'=>$Think.session.list_condition_book.GETTYPE_ID,'url'=>'dict/getGetType','key'=>'GETTYPE_ID','field'=>'GETTYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'入账形式','name'=>'ENTER_TYPE_ID','value'=>$Think.session.list_condition_book.ENTER_TYPE_ID,'url'=>'dict/getEnterType','key'=>'ENTER_TYPE_ID','field'=>'ENTER_TYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'价值类型','name'=>'VALUETYPE_ID','value'=>$Think.session.list_condition_book.VALUETYPE_ID,'url'=>'dict/getValueType','key'=>'VALUETYPE_ID','field'=>'VALUETYPE','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用状态','name'=>'STATUS_ID','value'=>$Think.session.list_condition_book.STATUS_ID,'url'=>'dict/getAssetStatus','key'=>'STATUS_ID','field'=>'STATUS','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用方向','name'=>'USEDIRECTION_ID','value'=>$Think.session.list_condition_book.USEDIRECTION_ID,'url'=>'dict/getUseDirection','key'=>'USEDIRECTION_ID','field'=>'USEDIRECTION','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'使用单位','name'=>'COLLEGE_ID','value'=>$Think.session.list_condition_book.COLLEGE_ID,'url'=>'dict/getCollege','key'=>'COLLEGE_ID','field'=>'SHORTNAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'管理单位','name'=>'MGR_COLLEGE_ID','value'=>$Think.session.list_condition_book.MGR_COLLEGE_ID,'url'=>'dict/getCollege','key'=>'COLLEGE_ID','field'=>'SHORTNAME','col'=>'col-xs-12'])}
                {:Form('select2',['title'=>'隶属单位','name'=>'BELONG_ID','value'=>$Think.session.list_condition_book.BELONG_ID,'url'=>'dict/getBelongList','key'=>'BELONG_ID','field'=>'BELONG','col'=>'col-xs-12'])}


                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                价值 从
                            </span>
                        <input name="BOOK_FEE_START"  value="{$Think.session.list_condition_book.BOOK_FEE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="BOOK_FEE_END"  value="{$Think.session.list_condition_book.BOOK_FEE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                取得日期 从
                            </span>
                        <input name="GET_DATE_START"  value="{$Think.session.list_condition_book.GET_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="GET_DATE_END"  value="{$Think.session.list_condition_book.GET_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                财务入账日期 从
                            </span>
                        <input name="ENTER_DATE_START"  value="{$Think.session.list_condition_book.ENTER_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="ENTER_DATE_END"  value="{$Think.session.list_condition_book.ENTER_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>

                <div class="col-xs-12" style="padding-top:4px;padding-bottom: 4px;">
                    <div class="input-group" style="width: 100%;">
                            <span class="input-group-addon" style="width: 100px;text-align: right">
                                投入使用日期 从
                            </span>
                        <input name="START_USE_DATE_START"  value="{$Think.session.list_condition_book.START_USE_DATE_START}"  type="text" class="form-control">
                        <span class="input-group-addon">
                                到
                            </span>
                        <input name="START_USE_DATE_END"  value="{$Think.session.list_condition_book.START_USE_DATE_END}"  type="text" class="form-control">

                    </div>
                </div>



            </div>
            <div class="col-xs-12" style="margin-top: 30px;text-align: center">
                <button onclick="search()" type="button" class="btn btn-info">查询</button>
                <button type="reset" class="btn btn-default" >重置</button>
                <button type="button" onclick="resetAll()" class="btn btn-danger" >清空</button>
            </div>
        </form>
    </div>
</div>

<script>
    $(function () {
        $("[name='GET_DATE_START']").flatpickr();
        $("[name='GET_DATE_END']").flatpickr();
        $("[name='ENTER_DATE_START']").flatpickr();
        $("[name='ENTER_DATE_END']").flatpickr();
        $("[name='START_USE_DATE_START']").flatpickr();
        $("[name='START_USE_DATE_END']").flatpickr();
    })
    function search() {
        $("#condition-form").ajaxSubmit(function (res) {
            console.log(res)
            var json = JSON.parse(res);
            if (json['code']=='200') {
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
                parent.refreshTable();
            }
        })
    }
    function resetAll() {
        $(':input','#condition-form')
            .not(':button, :submit, :reset, :hidden')
            .val('')
            .removeAttr('checked')
            .removeAttr('selected');
    }

</script>